import rxAjax from '@/assets/js/ajax.js';

export const OsUserSyncApi = {};

OsUserSyncApi.baseUrl= '/api-user/user/org/sync';

/**
 * 获取同步配置。
 * @returns {*}
 */
OsUserSyncApi.getSyncConfig= function() {
  var url= OsUserSyncApi.baseUrl + '/getSyncConfig' ;
  return rxAjax.get(url);
}


/**
 * 同步用户组织。
 * @returns {*}
 */
OsUserSyncApi.syncOrgUser= function(syncorgType) {
    var url= OsUserSyncApi.baseUrl + '/syncOrgUser?syncorgType='+syncorgType;
    return rxAjax.get(url);
}
OsUserSyncApi.getSyncCondition = function () {
    var url = OsUserSyncApi.baseUrl + '/getSyncCondition';
    return rxAjax.get(url);
}

/**
 * 推送用户组织。
 * @returns {*}
 */
OsUserSyncApi.pushOsGroup= function(platformType,tenantId) {
    var url= OsUserSyncApi.baseUrl + '/pushGroup?platformType=' +platformType+'&tenantId='+tenantId;
    return rxAjax.get(url);
}


export  default OsUserSyncApi;